home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / MUI / MCC_TextEditor / Developer / Autodocs / MCC_TextEditor.Doc
Encoding:
Text File  |  1998-02-20  |  34.6 KB  |  1,134 lines

  1. TABLE OF CONTENTS
  2.  
  3. TextEditor.mcc/TextEditor.mcc
  4. TextEditor.mcc/MUIA_TextEditor_AreaMarked
  5. TextEditor.mcc/MUIA_TextEditor_ColorMap
  6. TextEditor.mcc/MUIA_TextEditor_Contents
  7. TextEditor.mcc/MUIA_TextEditor_CursorX
  8. TextEditor.mcc/MUIA_TextEditor_CursorY
  9. TextEditor.mcc/MUIA_TextEditor_DoubleClickHook
  10. TextEditor.mcc/MUIA_TextEditor_ExportHook
  11. TextEditor.mcc/MUIA_TextEditor_ExportWrap
  12. TextEditor.mcc/MUIA_TextEditor_FixedFont
  13. TextEditor.mcc/MUIA_TextEditor_Flow
  14. TextEditor.mcc/MUIA_TextEditor_HasChanged
  15. TextEditor.mcc/MUIA_TextEditor_ImportHook
  16. TextEditor.mcc/MUIA_TextEditor_ImportWrap
  17. TextEditor.mcc/MUIA_TextEditor_InsertMode         (not yet implemented...)
  18. TextEditor.mcc/MUIA_TextEditor_InVirtualGroup
  19. TextEditor.mcc/MUIA_TextEditor_Pen
  20. TextEditor.mcc/MUIA_TextEditor_Prop_DeltaFactor
  21. TextEditor.mcc/MUIA_TextEditor_Prop_Entries
  22. TextEditor.mcc/MUIA_TextEditor_Prop_First
  23. TextEditor.mcc/MUIA_TextEditor_Prop_Visible
  24. TextEditor.mcc/MUIA_TextEditor_Quiet
  25. TextEditor.mcc/MUIA_TextEditor_ReadOnly
  26. TextEditor.mcc/MUIA_TextEditor_RedoAvailable
  27. TextEditor.mcc/MUIA_TextEditor_ReplaceWord        (not yet implemented...)
  28. TextEditor.mcc/MUIA_TextEditor_SearchFlags        (not yet implemented...)
  29. TextEditor.mcc/MUIA_TextEditor_SearchWord         (not yet implemented...)
  30. TextEditor.mcc/MUIA_TextEditor_Separator
  31. TextEditor.mcc/MUIA_TextEditor_Slider
  32. TextEditor.mcc/MUIA_TextEditor_StyleBold
  33. TextEditor.mcc/MUIA_TextEditor_StyleItalic
  34. TextEditor.mcc/MUIA_TextEditor_StyleUnderline
  35. TextEditor.mcc/MUIA_TextEditor_TypeAndSpell
  36. TextEditor.mcc/MUIA_TextEditor_UndoAvailable
  37. TextEditor.mcc/MUIA_TextEditor_WrapBorder
  38. TextEditor.mcc/MUIM_TextEditor_ARexxCmd
  39. TextEditor.mcc/MUIM_TextEditor_BlockInfo
  40. TextEditor.mcc/MUIM_TextEditor_ClearText
  41. TextEditor.mcc/MUIM_TextEditor_ExportBlock        (not yet implemented...)
  42. TextEditor.mcc/MUIM_TextEditor_ExportText
  43. TextEditor.mcc/MUIM_TextEditor_HandleError
  44. TextEditor.mcc/MUIM_TextEditor_InsertText
  45. TextEditor.mcc/MUIM_TextEditor_MacroBegin         (not yet implemented...)
  46. TextEditor.mcc/MUIM_TextEditor_MacroEnd           (not yet implemented...)
  47. TextEditor.mcc/MUIM_TextEditor_MacroExecute       (not yet implemented...)
  48. TextEditor.mcc/MUIM_TextEditor_MarkText
  49. TextEditor.mcc/MUIM_TextEditor_Replace            (not yet implemented...)
  50. TextEditor.mcc/MUIM_TextEditor_ReplaceGUI         (not yet implemented...)
  51. TextEditor.mcc/MUIM_TextEditor_ReplaceQuery       (not yet implemented...)
  52. TextEditor.mcc/MUIM_TextEditor_Search             (not yet implemented...)
  53. TextEditor.mcc/MUIM_TextEditor_SearchGUI          (not yet implemented...)
  54. TextEditor.mcc/TextEditor.mcc
  55.  
  56. TextEditor.mcc is a fast multiline stringgadget. It can hold quite large texts
  57. without noticeable slowdowns. It supports the clipboard, it can show text with
  58. different styles, alignments and colors. It can hold separators, it has
  59. multilevel undo/redo and it can easily be configured to use an external spell
  60. checker for type'n'spell and word guessing.
  61.  
  62. The gadget is copyrighted 1997 by Allan Odgaard, but licenced by Finale
  63. Development Inc. Please contact Info@Finale-Dev.com for a licence.
  64. Freeware authors though can freely use the gadget, but read the licence
  65. agreements anyway, as you'll have to show proper copyright info in your
  66. program/manual.
  67.  
  68. For feedback write to: Allan Odgaard
  69.                        Dagmarsgade 36
  70.                        DK-2200 Copenhagen
  71.                 email: Duff@DIKU.DK
  72.                   url: http://www.DIKU.dk/students/duff/
  73.  
  74. TextEditor.mcc/MUIA_TextEditor_AreaMarked
  75.  
  76.     NAME
  77.         MUIA_TextEditor_AreaMarked -- [..G], BOOL
  78.  
  79.     FUNCTION
  80.         This tag will be set to TRUE when text is marked. And back to
  81.         FALSE when nothing is marked.
  82.         You can create a notifyevent with this tag and let your cut/copy
  83.         buttons become ghosted when nothing is marked.
  84.  
  85. TextEditor.mcc/MUIA_TextEditor_ColorMap
  86.  
  87.     NAME
  88.         MUIA_TextEditor_ColorMap -- [IS.], LONG *
  89.  
  90.     FUNCTION
  91.         This is a map of allocated colors, which corresponds to the pen number
  92.         you set with MUIA_TextEditor_Pen.
  93.         By default the map looks like this:
  94.  
  95.            0 = Normal (user configured text/highlight color)
  96.            1 = Shine
  97.            2 = Halfshine
  98.            3 = Background
  99.            4 = Halfshadow
  100.            5 = Shadow
  101.            6 = Text
  102.            7 = Fill
  103.            8 = Mark
  104.            9 = Screen pen 0
  105.           10 = Screen pen 1
  106.           11 = Screen pen 3
  107.           .. = ...
  108.          255 = Screen pen 246
  109.  
  110.         If you supply your own colormap, then pen value 0 will still be
  111.         "Normal", i.e. the first entry in your colormap has pen value 1.
  112.         This may seem a bit illogical, suggest an alternative if you want!
  113.  
  114.         You are allowed to dynamically change the colormap. However if you
  115.         change an entry which is on-screen, then it won't have any immediate
  116.         effect. The idea is that you should e.g. supply a colormap with 16
  117.         unused LONGs, allow the user to select a custom color, allocate that
  118.         color and store the screen pen value into the colormap. Now you can
  119.         use that entry as argument to MUIA_TextEditor_Pen.
  120.  
  121.         Have in mind that your application may change screen, so the best
  122.         place to allocate/free colors are in the MUIM_Show and MUIM_Hide
  123.         methods of the editorgadget. An example of this can be found in
  124.         TextEditor-Demo.c
  125.  
  126.     EXAMPLE
  127.         /*  Create a cyclegadget which allows the user
  128.          *  to mark his text with red, green and blue.
  129.          */
  130.  
  131.            static LONG editor_cmap[3];
  132.            UBYTE *cycle_entries[] =
  133.            {
  134.              "Normal", "Red", "Green", "Blue", NULL
  135.            };
  136.  
  137.         ...
  138.            cycle = CycleObject,
  139.                        MUIA_Cycle_Entries, cycle_entries,
  140.                        End,
  141.            ...
  142.            editor = TextEditorObject,
  143.                        MUIA_TextEditor_ColorMap, editor_cmap,
  144.                        End,
  145.         ...
  146.  
  147.  
  148.         DoMethod(cycle, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, editor, 3, MUIM_Set, MUIA_TextEditor_Pen, MUIV_TriggerValue);
  149.         DoMethod(editor, MUIM_Notify, MUIA_TextEditor_Pen, MUIV_EveryTime, cycle, 3, MUIM_Set, MUIA_Cycle_Active, MUIV_TriggerValue);
  150.  
  151.         /* Subclass of TextEditor.mcc */
  152.  
  153.            switch(msg->MethodID)
  154.            {
  155.               case MUIM_Show:
  156.                  editor_cmap[0] = ObtainBestPenA(cm, 0xffffffff, 0, 0, NULL);
  157.                  editor_cmap[1] = ObtainBestPenA(cm, 0, 0xffffffff, 0, NULL);
  158.                  editor_cmap[2] = ObtainBestPenA(cm, 0, 0, 0xffffffff, NULL);
  159.                  break;
  160.  
  161.               case MUIM_Hide:
  162.                  ReleasePen(cm, editor_cmap[0]);
  163.                  ReleasePen(cm, editor_cmap[1]);
  164.                  ReleasePen(cm, editor_cmap[2]);
  165.                  break;
  166.            }
  167.            ...
  168.  
  169.  
  170.     SEE ALSO
  171.         MUIA_TextEditor_Pen
  172.  
  173. TextEditor.mcc/MUIA_TextEditor_Contents
  174.  
  175.     NAME
  176.         MUIA_TextEditor_Contents -- [IS.], APTR
  177.  
  178.     FUNCTION
  179.         Set the contents of this gadget. This should normally be a pointer to
  180.         a text buffer, but if you have supplied your own importhook, then you
  181.         can set this to anything you like, e.g. a filehandle.
  182.  
  183.     SEE ALSO
  184.         MUIA_TextEditor_ImportHook, MUIM_TextEditor_InsertText
  185.  
  186. TextEditor.mcc/MUIA_TextEditor_CursorX
  187.  
  188.     NAME
  189.         MUIA_TextEditor_CursorX -- [ISG], ULONG
  190.  
  191.     FUNCTION
  192.         You can get or set the cursors x position with this tag.
  193.         The first character on a line has position 0.
  194.         The position is not affected by the gadgets `autowrap' feature.
  195.         If you set a value higher than the length of the current line, then
  196.         it will automatically be truncated.
  197.  
  198.     SEE ALSO
  199.         MUIA_TextEditor_CursorY, MUIA_TextEditor_Position
  200.  
  201. TextEditor.mcc/MUIA_TextEditor_CursorY
  202.  
  203.     NAME
  204.         MUIA_TextEditor_CursorY -- [ISG], ULONG
  205.  
  206.     FUNCTION
  207.         You can get or set the cursors y position with this tag.
  208.         The first line has position 0.
  209.         The position is not affected by the gadgets `autowrap' feature.
  210.         If you set a value higher than the number of lines, then it will
  211.         automatically be truncated.
  212.  
  213.     SEE ALSO
  214.         MUIA_TextEditor_CursorX, MUIA_TextEditor_Position
  215.  
  216. TextEditor.mcc/MUIA_TextEditor_DoubleClickHook
  217.  
  218.     NAME
  219.         MUIA_TextEditor_DoubleClickHook -- [IS.], struct Hook *
  220.  
  221.     FUNCTION
  222.         If you use the gadget in ReadOnly mode then you may want a special
  223.         action to take place when the user doubleclick certain words.
  224.         For example a mail or news client, using this gadget to show mails,
  225.         may want the user to be able to click on URL's to lookup the link.
  226.  
  227.         The hook will be called with A1 pointing to a ClickMessage, and A0
  228.         will point to the hook itself.
  229.         Your hook should return TRUE if it wants to stop the editor from
  230.         blocking.
  231.  
  232.     EXAMPLE
  233.         /* This hook will test if the user doubleclicked an http address */
  234.  
  235.         BOOL URLHookCode (register __a1 struct ClickMessage *clickmsg)
  236.         {
  237.               UWORD pos = clickmsg->ClickPosition;
  238.  
  239.            while(pos && *(clickmsg->LineContents+pos-1) != ' ' && *(clickmsg->LineContents+pos-1) != '<')
  240.            {
  241.               pos--;
  242.            }
  243.  
  244.            if(strncmp(clickmsg->LineContents+pos, "http:", 5))
  245.            {
  246.               return(FALSE);
  247.            }
  248.            LookupURL(clickmsg->LineContents+pos);
  249.            return(TRUE);
  250.         }
  251.  
  252.     SEE ALSO
  253.         MUIA_TextEditor_ReadOnly, mui/TextEditor_mcc.h
  254.  
  255. TextEditor.mcc/MUIA_TextEditor_ExportHook
  256.  
  257.     NAME
  258.         MUIA_TextEditor_ExportHook -- [IS.], struct Hook *
  259.  
  260.     SPECIAL INPUTS
  261.         MUIV_TextEditor_ExportHook_EMail
  262.         MUIV_TextEditor_ExportHook_Plain (default)
  263.  
  264.     FUNCTION
  265.         The EMail export hook will convert a bold word to *bold*, italic
  266.         words to /italic/ and underlined words to _underline_.
  267.         It also export separators such as <sb> or <tsb>.
  268.  
  269.         See MUIA_TextEditor_ImportHook for more documentation.
  270.  
  271.     SEE ALSO
  272.         MUIA_TextEditor_ExportWrap, MUIA_TextEditor_ImportHook
  273.         MUIM_TextEditor_ExportText
  274.  
  275. TextEditor.mcc/MUIA_TextEditor_ExportWrap
  276.  
  277.     NAME
  278.         MUIA_TextEditor_ExportWrap -- [ISG], ULONG
  279.  
  280.     FUNCTION
  281.         This attribute allows the builtin export hooks to perform wordwrap.
  282.         Zero means no wrap (default).
  283.  
  284.     SEE ALSO
  285.         MUIA_TextEditor_ExportHook, MUIA_TextEditor_WrapBorder
  286.  
  287. TextEditor.mcc/MUIA_TextEditor_FixedFont
  288.  
  289.     NAME
  290.         MUIA_TextEditor_FixedFont -- [I.G], BOOL
  291.  
  292.     FUNCTION
  293.         Set this if you would like a fixed font for the editor.
  294.  
  295. TextEditor.mcc/MUIA_TextEditor_Flow
  296.  
  297.     NAME
  298.         MUIA_TextEditor_Flow -- [.SG], UWORD
  299.  
  300.     SPECIAL INPUTS
  301.         MUIV_TextEditor_Flow_Left
  302.         MUIV_TextEditor_Flow_Right
  303.         MUIV_TextEditor_Flow_Center
  304.         MUIV_TextEditor_Flow_Justified (not yet implemented)
  305.  
  306.     FUNCTION
  307.         Set/get the current paragraphs alignment.
  308.         If an area is marked while you set this attribute, then the new
  309.         alignment will be set for the complete area.
  310.  
  311. TextEditor.mcc/MUIA_TextEditor_HasChanged
  312.  
  313.     NAME
  314.         MUIA_TextEditor_HasChanged -- [ISG], BOOL
  315.  
  316.     FUNCTION
  317.         This tag will show if the contents of the gadget has changed.
  318.         You can take notify on this tag, so that you can connect it with a
  319.         checkmark or textobject.
  320.         You should set this tag to FALSE whenever you export the contents of
  321.         the gadget or overwrite it with something new.
  322.  
  323.         Even though you have set up notification on this tag you should
  324.         still get() it before you kill the text, because this makes it
  325.         possible to do some advanced testing to see if the text has actually
  326.         been modified. E.g. by checking the undobuffer, comparing checksums
  327.         or by checking whether or not the textbuffer is empty (none of this
  328.         is currently done, but it may be in the future).
  329.  
  330.         The tag is currently not affected by:
  331.          MUIA_TextEditor_Contents, MUIM_TextEditor_ClearText
  332.          MUIM_TextEditor_Export, MUIM_TextEditor_Import
  333.  
  334.         But I'm open for comments :)
  335.  
  336. TextEditor.mcc/MUIA_TextEditor_ImportHook
  337.  
  338.     NAME
  339.         MUIA_TextEditor_ImportHook -- [IS.], struct Hook *
  340.  
  341.     SPECIAL INPUTS
  342.         MUIV_TextEditor_ImportHook_EMail
  343.         MUIV_TextEditor_ImportHook_MIME
  344.         MUIV_TextEditor_ImportHook_MIMEQuoted
  345.         MUIV_TextEditor_ImportHook_Plain (default)
  346.  
  347.     FUNCTION                                                
  348.         Since this gadget allows different text styles, you can supply an
  349.         importhook to parse the text correctly.
  350.  
  351.         The default importhook understands the following escape sequences:
  352.  
  353.          <ESC> + u      Set the soft style to underline.
  354.          <ESC> + b      Set the soft style to bold.
  355.          <ESC> + i      Set the soft style to italic.
  356.          <ESC> + n      Set the soft style back to normal.
  357.          <ESC> + h      Highlight the current line.
  358.          <ESC> + p[x]   Change to color x, where x is taken from the colormap.
  359.                         0 means normal. The color is reset for each new line.
  360.  
  361.              The following sequences are only valid at the beginning of a line.
  362.  
  363.          <ESC> + l      Left justify current and following lines.
  364.          <ESC> + r      Right justify current and following lines.
  365.          <ESC> + c      Center current and following lines.
  366.          <ESC> + [s:x]  Create a separator. x is a bit combination of flags:
  367.                          Placement (mutually exclusive):
  368.                            1 = Top
  369.                            2 = Middle
  370.                            4 = Bottom
  371.                          Cosmetical:
  372.                            8 = StrikeThru   - Draw separator ontop of text.
  373.                           16 = Thick        - Make separator extra thick.
  374.  
  375.  
  376.           MUIV_TextEditor_ImportHook_MIME:
  377.  
  378.         This builtin hook will convert quoted-printables (e.g. "=E5") to the
  379.         ASCII representation, and merge lines ending with a "=", it will
  380.         wordwrap the text (using the value set with
  381.         MUIA_TextEditor_ImportWrap), it will highlight all lines which start
  382.         with ">" it will make real *bold*, /italic/, _underline_ and
  383.         #colored#, and it will replace <sb> or <tsb> with a real separator
  384.         bar. It stops parsing when it reaches a NULL byte.
  385.  
  386.         The color used for #colored# text is colormap entry 6, which defaults
  387.         to MPEN_FILL. To override it, just supply a colormap with entry 6 set
  388.         to whatever color you would like.
  389.  
  390.  
  391.           MUIV_TextEditor_ImportHook_MIMEQuoted:
  392.  
  393.         Like the MIME importhook, but each line gets quoted and highlighted.
  394.  
  395.  
  396.           MUIV_TextEditor_ImportHook_EMail:
  397.  
  398.         Like the MIME importhook, but it doesn't convert quoted printables.
  399.  
  400.  
  401.         You can of course create your own importhook, there is an external
  402.         file which describes the procedure.
  403.  
  404.       *** PLEASE DON'T CREATE YOUR OWN HOOKS WHILE THE GADGET IS STILL BETA ***
  405.  
  406.     SEE ALSO
  407.         MUIA_TextEditor_ColorMap, MUIA_TextEditor_ExportHook
  408.         MUIA_TextEditor_ImportWrap
  409.  
  410.     EXAMPLE
  411.         /*   Here is how you can `easily' allow the
  412.          *   user to set the pen of #colored# text
  413.          */
  414.  
  415.            static LONG editor_cmap[1];
  416.  
  417.         set(editor, MUIA_TextEditor_ColorMap, editor_cmap-6);
  418.                                            /* This saves a little memory :) */
  419.  
  420.  
  421.         /* Subclass of TextEditor.mcc */
  422.  
  423.            switch(msg->MethodID)
  424.            {
  425.               case MUIM_Show:
  426.                  editor_cmap[0] = MUI_ObtainPen(muiRenderInfo(obj), spec, flags);
  427.                  break;
  428.  
  429.               case MUIM_Hide:
  430.                  MUI_ReleasePen(muiRenderInfo(obj), editor_cmap[0]);
  431.                  break;
  432.            }
  433.            ...
  434.  
  435. TextEditor.mcc/MUIA_TextEditor_ImportWrap
  436.  
  437.     NAME
  438.         MUIA_TextEditor_ImportWrap -- [ISG], ULONG
  439.  
  440.     FUNCTION
  441.         This is here to allow the builtin import hooks to perform wordwrap.
  442.         The builtin hooks accepts a value between 4 and 1024. Defaults to 1023.
  443.  
  444.     SEE ALSO
  445.         MUIA_TextEditor_ImportHook, MUIA_TextEditor_WrapBorder
  446.  
  447. TextEditor.mcc/MUIA_TextEditor_InsertMode
  448.  
  449.     NAME
  450.         MUIA_TextEditor_InsertMode -- [ISG], BOOL
  451.  
  452.     FUNCTION
  453.         Not yet implemented...
  454.  
  455. TextEditor.mcc/MUIA_TextEditor_InVirtualGroup
  456.  
  457.     NAME
  458.         MUIA_TextEditor_InVirtualGroup -- [I..], BOOL
  459.  
  460.     FUNCTION
  461.         Set this to TRUE when the gadget is inside a virtualgroup.
  462.         The reason is cosmetical. The pattern will be relative to the gadget
  463.         instead of the window, since the gadget can be "moved" around.
  464.  
  465. TextEditor.mcc/MUIA_TextEditor_Pen
  466.  
  467.     NAME
  468.         MUIA_TextEditor_Pen -- [.SG], UBYTE (do you need UWORD or ULONG?)
  469.  
  470.     FUNCTION
  471.         The value of this tag reflects the current render pen.
  472.  
  473.     SEE ALSO
  474.         MUIA_TextEditor_ColorMap
  475.  
  476. TextEditor.mcc/MUIA_TextEditor_Prop_DeltaFactor
  477.  
  478.     NAME
  479.         MUIA_TextEditor_Prop_DeltaFactor -- [..G], ULONG (OBSOLETE)
  480.  
  481.  
  482.     FUNCTION
  483.         This tag can tell you how high a line is. This is useful when you set
  484.         the increment value of a slider, as MUIA_TextEditor_Prop_Entries holds
  485.         the lines in pixels.
  486.  
  487.         You shouldn't use this. Instead use MUIA_TextEditor_Slider.
  488.  
  489.     EXAMPLE
  490.  
  491.         DoMethod(editorgad, MUIM_Notify,
  492.                   MUIA_TextEditor_Prop_DeltaFactor, MUIV_EveryTime,
  493.                   slider, 3, MUIM_Set, MUIA_Prop_DeltaFactor, MUIV_TriggerValue);
  494.  
  495.     SEE ALSO
  496.         MUIA_TextEditor_Prop_Visible, MUIA_TextEditor_Slider
  497.         MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_Entries
  498.  
  499. TextEditor.mcc/MUIA_TextEditor_Prop_Entries
  500.  
  501.     NAME
  502.         MUIA_TextEditor_Prop_Entries -- [..G], ULONG (OBSOLETE)
  503.  
  504.  
  505.     FUNCTION
  506.         This value is the total number of lines in the editor.
  507.         If you want a slider attached to the gadget you should create a
  508.         notify on this attribute.
  509.  
  510.         You shouldn't use this. Instead use MUIA_TextEditor_Slider.
  511.  
  512.     EXAMPLE
  513.  
  514.         DoMethod(editorgad, MUIM_Notify,
  515.                   MUIA_TextEditor_Prop_Entries, MUIV_EveryTime,
  516.                   slider, 3, MUIM_Set, MUIA_Prop_Entries, MUIV_TriggerValue);
  517.  
  518.     SEE ALSO
  519.         MUIA_TextEditor_Prop_Visible, MUIA_TextEditor_Slider
  520.         MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_DeltaFactor
  521.  
  522. TextEditor.mcc/MUIA_TextEditor_Prop_First
  523.  
  524.     NAME
  525.         MUIA_TextEditor_Prop_First -- [.SG], ULONG (OBSOLETE)
  526.  
  527.     FUNCTION
  528.         Get or set the first displayed line.
  529.         The purpose of this attribute is to allow connection between the
  530.         editorgadget and a scrollbar.
  531.  
  532.     EXAMPLE
  533.  
  534.         DoMethod(editor, MUIM_Notify,
  535.                   MUIA_TextEditor_Prop_First, MUIV_EveryTime,
  536.                   slider, 3, MUIM_Set, MUIA_Prop_First, MUIV_TriggerValue);
  537.         
  538.         DoMethod(slider, MUIM_Notify,
  539.                   MUIA_Prop_First, MUIV_EveryTime,
  540.                   editor, 3, MUIM_Set, MUIA_TextEditor_Prop_First, MUIV_TriggerValue);
  541.  
  542.     SEE ALSO
  543.         MUIA_TextEditor_Prop_Visible, MUIA_TextEditor_Slider
  544.         MUIA_TextEditor_Prop_Entries, MUIA_TextEditor_Prop_DeltaFactor
  545. TextEditor.mcc/MUIA_TextEditor_Prop_Visible
  546.  
  547.     NAME
  548.         MUIA_TextEditor_Prop_Visible -- [..G], ULONG (OBSOLETE)
  549.  
  550.     FUNCTION
  551.         This value is the number of lines that currently fits in the window.
  552.         If you want a slider attached to the gadget you should create a
  553.         notify on this attribute.
  554.  
  555.         You shouldn't use this. Instead use MUIA_TextEditor_Slider.
  556.  
  557.     EXAMPLE
  558.  
  559.         DoMethod(editorgad, MUIM_Notify,
  560.                   MUIA_TextEditor_Prop_Visible, MUIV_EveryTime,
  561.                   slider, 3, MUIM_Set, MUIA_Prop_Visible, MUIV_TriggerValue);
  562.  
  563.     SEE ALSO
  564.         MUIA_TextEditor_Prop_Entries, MUIA_TextEditor_Slider
  565.         MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_DeltaFactor
  566.  
  567. TextEditor.mcc/MUIA_TextEditor_Quiet
  568.  
  569.     NAME
  570.         MUIA_TextEditor_Quiet -- [ISG], BOOL
  571.  
  572.     FUNCTION
  573.         If you need to insert a lot of text "line by line" you should
  574.         set this tag to TRUE before starting, and then back to FALSE when you
  575.         are done adding text.
  576.  
  577.     SEE ALSO
  578.         MUIM_TextEditor_InsertText
  579.  
  580. TextEditor.mcc/MUIA_TextEditor_ReadOnly
  581.  
  582.     NAME
  583.         MUIA_TextEditor_ReadOnly -- [ISG], BOOL
  584.  
  585.     FUNCTION
  586.         Setting this tag to TRUE will make the text ReadOnly.
  587.         This is very similar to the FloatText.mui, except that this gadget
  588.         offers blocking.
  589.  
  590.         In ReadOnly-mode there will be:
  591.         No cursor (but a normal TAB-frame).
  592.         TAB will activate the next gadget (instead of alt TAB).
  593.         The frame will be set to a ReadListFrame. (may change).
  594.         There is no ARexx support, except "Copy".
  595.  
  596.         The MUIA_TextEditor_StyleXXX tags are still useable.
  597.  
  598. TextEditor.mcc/MUIA_TextEditor_RedoAvailable
  599.  
  600.     NAME
  601.         MUIA_TextEditor_RedoAvailable -- [..G], BOOL
  602.  
  603.     FUNCTION
  604.         This tag is set to TRUE when the user is able to redo his action(s)
  605.         (normally after an undo).
  606.         You can create a notify on this tag and let your redo button be
  607.         ghosted when there is nothing to redo.
  608.  
  609.     SEE ALSO
  610.         MUIA_TextEditor_UndoAvailable
  611.  
  612. TextEditor.mcc/MUIA_TextEditor_ReplaceWord
  613.  
  614.     NAME
  615.         MUIA_TextEditor_ReplaceWord -- [ISG], STRPTR
  616.  
  617.     FUNCTION
  618.  
  619.  
  620.     SEE ALSO
  621.         MUIA_TextEditor_SearchFlags, MUIA_TextEditor_SearchWord,
  622.         MUIM_TextEditor_Replace, MUIM_TextEditor_ReplaceGUI,
  623.         MUIM_TextEditor_ReplaceQuery, MUIM_TextEditor_Search,
  624.         MUIM_TextEditor_SearchGUI
  625.  
  626. TextEditor.mcc/MUIA_TextEditor_SearchFlags
  627.  
  628.     NAME
  629.         MUIA_TextEditor_SearchFlags -- [ISG], ULONG
  630.  
  631.     FUNCTION
  632.  
  633.  
  634.     SEE ALSO
  635.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchWord,
  636.         MUIM_TextEditor_Replace, MUIM_TextEditor_ReplaceGUI,
  637.         MUIM_TextEditor_ReplaceQuery, MUIM_TextEditor_Search,
  638.         MUIM_TextEditor_SearchGUI
  639.  
  640. TextEditor.mcc/MUIA_TextEditor_SearchWord
  641.  
  642.     NAME
  643.         MUIA_TextEditor_SearchWord -- [ISG], STRPTR
  644.  
  645.     FUNCTION
  646.  
  647.  
  648.     SEE ALSO
  649.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchFlags,
  650.         MUIM_TextEditor_Replace, MUIM_TextEditor_ReplaceGUI,
  651.         MUIM_TextEditor_ReplaceQuery, MUIM_TextEditor_Search,
  652.         MUIM_TextEditor_SearchGUI
  653.  
  654. TextEditor.mcc/MUIA_TextEditor_Separator
  655.  
  656.     NAME
  657.         MUIA_TextEditor_Separator -- [.SG], UWORD *
  658.  
  659.     FUNCTION
  660.         Each line can act as a separator.
  661.  
  662.         A separator can be either thick or thin. It can be rendered over the
  663.         lines contents, or only on both sides of the contents. The placement
  664.         can be either top, middle or bottom.
  665.  
  666.         This tag reflects the current line. See mui/TextEditor_mcc.h for
  667.         definitions.
  668.  
  669.     EXAMPLE
  670.         /* A simple way to let the user insert a separator is to create a
  671.            button or menuitem with the following notify.
  672.  
  673.                   Note: The ImportHook should be set to
  674.                         MUIV_TextEditor_ImportHook_Plain
  675.                         when the notify is executed.
  676.         */
  677.  
  678.            DoMethod(button, MUIM_Notify,
  679.                       MUIA_Pressed, FALSE,
  680.                       editor, 2, MUIM_TextEditor_InsertText, "\n\33c\33[s:2]\n");
  681.  
  682. TextEditor.mcc/MUIA_TextEditor_Slider
  683.  
  684.     NAME
  685.         MUIA_TextEditor_Slider -- [I..], Object *
  686.  
  687.     FUNCTION
  688.         You should give a pointer to a propobject to allow connection between
  689.         the editorgadget and the propobject.
  690.  
  691.         The reason why you shouldn't set up notification yourself is that the
  692.         gadget needs to set two undocumented tags for the propobject.
  693.  
  694.     SEE ALSO
  695.         MUIA_TextEditor_LinesTotal, MUIA_TextEditor_LinesVisible
  696.         MUIA_TextEditor_TopLine
  697.  
  698. TextEditor.mcc/MUIA_TextEditor_StyleBold
  699.  
  700.     NAME
  701.         MUIA_TextEditor_StyleBold -- [.SG], BOOL
  702.  
  703.     FUNCTION
  704.         This tag shows whether the cursor or block is over bolded text or not.
  705.         You can set this tag to TRUE or FALSE if you want the style changed.
  706.  
  707.     EXAMPLE
  708.  
  709.         DoMethod(boldgad, MUIM_Notify,
  710.                   MUIA_Selected, MUIV_EveryTime,
  711.                   editor, 3, MUIM_NoNotifySet, MUIA_TextEditor_StyleBold, MUIV_TriggerValue);
  712.  
  713.         DoMethod(editor, MUIM_Notify,
  714.                   MUIA_TextEditor_StyleBold, MUIV_EveryTime,
  715.                   boldgad, 3, MUIM_NoNotifySet, MUIA_Selected, MUIV_TriggerValue);
  716.  
  717.     SEE ALSO
  718.         MUIA_TextEditor_StyleItalic, MUIA_TextEditor_StyleUnderline
  719.  
  720. TextEditor.mcc/MUIA_TextEditor_StyleItalic
  721.  
  722.     NAME
  723.         MUIA_TextEditor_StyleItalic -- [.SG], BOOL
  724.  
  725.     FUNCTION
  726.         This tag shows whether the cursor or block is over text in italics or
  727.         not.
  728.         You can set this tag to TRUE or FALSE if you want the style changed.
  729.  
  730.     EXAMPLE
  731.         see MUIA_TextEditor_StyleBold
  732.  
  733.     SEE ALSO
  734.         MUIA_TextEditor_StyleBold, MUIA_TextEditor_StyleUnderline
  735.  
  736. TextEditor.mcc/MUIA_TextEditor_StyleUnderline
  737.  
  738.     NAME
  739.         MUIA_TextEditor_StyleUnderline -- [.SG], BOOL
  740.  
  741.     FUNCTION
  742.         This tag shows whether the cursor or block is over underlined text or
  743.         not.
  744.         You can set this tag to TRUE or FALSE if you want the style changed.
  745.  
  746.     EXAMPLE
  747.         see MUIA_TextEditor_StyleBold
  748.  
  749.     SEE ALSO
  750.         MUIA_TextEditor_StyleBold, MUIA_TextEditor_StyleItalic
  751.  
  752. TextEditor.mcc/MUIA_TextEditor_TypeAndSpell
  753.  
  754.     NAME
  755.         MUIA_TextEditor_TypeAndSpell -- [.SG], BOOL
  756.  
  757.     FUNCTION
  758.         This is a shortcut to the Type'n'spell switch that the user can set
  759.         in the .mcp module.
  760.         Never integrate this into the settings of your preferences.
  761.  
  762.     EXAMPLE
  763.  
  764.         DoMethod(editor, MUIM_Notify,
  765.                   MUIA_TextEditor_TypeAndSpell, MUIV_EveryTime,
  766.                   toggle, 3, MUIM_Set, MUIA_Selected, MUIV_TriggerValue);
  767.         DoMethod(toggle, MUIM_Notify,
  768.                   MUIA_Selected, MUIV_EveryTime,
  769.                   editor, 3, MUIM_Set, MUIA_TextEditor_TypeAndSpell, MUIV_TriggerValue);
  770.  
  771. TextEditor.mcc/MUIA_TextEditor_UndoAvailable
  772.  
  773.     NAME
  774.         MUIA_TextEditor_UndoAvailable -- [..G], BOOL
  775.  
  776.     FUNCTION
  777.         This tag is set to TRUE when the user is able to undo his action(s)
  778.         You can create a notify on this tag and let your undo button be
  779.         ghosted when there is nothing to undo.
  780.  
  781.     SEE ALSO
  782.         MUIA_TextEditor_RedoAvailable
  783.  
  784. TextEditor.mcc/MUIA_TextEditor_WrapBorder
  785.  
  786.     NAME
  787.         MUIA_TextEditor_WrapBorder -- [ISG], ULONG
  788.  
  789.     FUNCTION
  790.         The gadget will insert a linebreak infront of the current word, if
  791.         the cursor comes beyond the column given here.
  792.  
  793.         Please remember that the gadget does realtime wordwrap which is much
  794.         better! This tag is for special cases!!!
  795.  
  796.     SEE ALSO
  797.         MUIA_TextEditor_ExportWrap, MUIA_TextEditor_ImportWrap
  798.  
  799. TextEditor.mcc/MUIM_TextEditor_ARexxCmd
  800.  
  801.     NAME
  802.         MUIM_TextEditor_ARexxCmd
  803.  
  804.     SYNOPSIS
  805.         DoMethod(obj, MUIM_TextEditor_ARexxCmd, STRPTR command);
  806.  
  807.     FUNCTION
  808.         If the user spends much of his time in the TextEditor gadget, then he
  809.         may want to have the gadgets functions integrated in the programs
  810.         arexx command set.
  811.         This can easily be done with this method, simply call it with the
  812.         command that the user has executed. If the method returns something
  813.         else than FALSE, then the command has been used by the gadget. If it
  814.         does return FALSE, then you should parse the command yourself.
  815.  
  816.         This method can also be used by you, to communicate with the gadget.
  817.  
  818.         The following commands are currently supported:
  819.  
  820.            CLEAR
  821.            CUT
  822.            COPY
  823.            PASTE
  824.            ERASE
  825.            GOTOLINE       Template: /N/A
  826.            GOTOCOLUMN     Template: /N/A
  827.            CURSOR         Template: Up/S,Down/S,Left/S,Right/S
  828.            LINE           Template: /N/A
  829.            COLUMN         Template: /N/A
  830.            NEXT           Template: Word/S,Sentence/S,Paragraph/S,Page/S
  831.            PREVIOUS       Template: Word/S,Sentence/S,Paragraph/S,Page/S
  832.            POSITION       Template: SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
  833.            SETBOOKMARK    Template: /N/A
  834.            GOTOBOOKMARK   Template: /N/A
  835.            TEXT           Template: /F
  836.            UNDO
  837.            REDO
  838.            GETLINE
  839.            GETCURSOR      Template: Line/S,Column/S
  840.            MARK           Template: On/S,Off/S
  841.            DELETE
  842.            BACKSPACE
  843.  
  844.     RESULT
  845.         The method will return FALSE if it couldn't use the command.
  846.         It will return TRUE if it did use the command, but the command didn't
  847.         give a result. It will return a pointer (STRPTR) when the command
  848.         gives a result, you should return this pointer to the user
  849.         (CreateArgString() it, and set it as the result, in the rexx message),
  850.         you must free the result yourself with FreeVec()
  851.  
  852. TextEditor.mcc/MUIM_TextEditor_BlockInfo
  853.  
  854.     NAME
  855.         MUIM_TextEditor_BlockInfo
  856.  
  857.     SYNOPSIS
  858.         DoMethod(obj, MUIM_TextEditor_BlockInfo, ULONG *startx, ULONG *starty,
  859.                       ULONG *stopx, ULONG *stopy);
  860.  
  861.     FUNCTION
  862.         This method fills out the ULONG pointers with the start and stop
  863.         position of the currently marked block.
  864.  
  865.     RESULT
  866.         The method will return FALSE if no text have been marked.
  867.  
  868.     EXAMPLE
  869.         ULONG x1, y1, x2, y2;
  870.         if(DoMethod(obj, MUIM_TextEditor_BlockInfo, &x1, &y1, &x2, &y2))
  871.         {
  872.            ...
  873.         }
  874.  
  875. TextEditor.mcc/MUIM_TextEditor_ClearText
  876.  
  877.     NAME
  878.         MUIM_TextEditor_ClearText
  879.  
  880.     SYNOPSIS
  881.         DoMethod(obj, MUIM_TextEditor_ClearText);
  882.  
  883.     FUNCTION
  884.         This will clear all text in the gadget.
  885.  
  886. TextEditor.mcc/MUIM_TextEditor_ExportBlock
  887.  
  888.     NAME
  889.         MUIM_TextEditor_ExportBlock
  890.  
  891.     SYNOPSIS
  892.         DoMethod(obj, MUIM_TextEditor_ExportBlock);
  893.  
  894.     FUNCTION
  895.         Not yet implemented...
  896.  
  897.     RESULT
  898.         
  899.  
  900.     SEE ALSO
  901.         MUIM_TextEditor_InsertText, MUIM_TextEditor_ExportText
  902.  
  903. TextEditor.mcc/MUIM_TextEditor_ExportText
  904.  
  905.     NAME
  906.         MUIM_TextEditor_ExportText
  907.  
  908.     SYNOPSIS
  909.         DoMethod(obj, MUIM_TextEditor_ExportText);
  910.  
  911.     FUNCTION
  912.         This will export the text using the current exporthook.
  913.  
  914.     RESULT
  915.         This depends on the exporthook. The builtin hooks will return a
  916.         pointer to a null terminated buffer containing all the text. You must
  917.         free this buffer with FreeVec() when you are done using it.
  918.  
  919.     SEE ALSO
  920.         MUIM_TextEditor_InsertText, MUIM_TextEditor_ExportBlock
  921.  
  922. TextEditor.mcc/MUIM_TextEditor_HandleError
  923.  
  924.     NAME
  925.         MUIM_TextEditor_HandleError
  926.  
  927.     SYNOPSIS
  928.         DoMethod(obj, MUIM_TextEditor_InsertText, ULONG errorcode);
  929.  
  930.     FUNCTION
  931.         This method is not supported by the editorgadget itself. The idea is
  932.         that you should subclass the gadget and implement your own error
  933.         handler. The handler should just bring up a requester or write the
  934.         error in a status line.
  935.  
  936.         The different errors are:
  937.  
  938.         Error_ClipboardIsEmpty:        The clipboard doesn't hold any data.
  939.         Error_ClipboardIsNotFTXT:      The clipboard doesn't hold any text.
  940.         Error_MacroBufferIsFull:       Not yet used.
  941.         Error_MemoryAllocationFailed:  Not yet used.
  942.         Error_NoAreaMarked:            The user has tried to copy or cut, but
  943.                                        hasn't marked anything.
  944.         Error_NoMacroDefined:          Not yet used.
  945.         Error_NothingToRedo:           There is nothing more to redo.
  946.         Error_NothingToUndo:           There is nothing more to undo.
  947.         Error_NotEnoughUndoMem:        The user has erased a block that is too
  948.                                        big to be saved. This results in a lost
  949.                                        undobuffer.
  950.         Error_StringNotFound:          Not yet used.
  951.  
  952.     RESULT
  953.         NONE
  954.  
  955. TextEditor.mcc/MUIM_TextEditor_InsertText
  956.  
  957.     NAME
  958.         MUIM_TextEditor_InsertText
  959.  
  960.     SYNOPSIS
  961.         DoMethod(obj, MUIM_TextEditor_InsertText, STRPTR text, LONG pos);
  962.  
  963.     FUNCTION
  964.         This will insert the given text using the current importhook.
  965.         The position of the inserted text can be:
  966.  
  967.           MUIV_TextEditor_InsertText_Cursor
  968.           MUIV_TextEditor_InsertText_Top
  969.           MUIV_TextEditor_InsertText_Bottom
  970.  
  971.     RESULT
  972.         NONE
  973.  
  974.     SEE ALSO
  975.         MUIM_TextEditor_ExportText
  976.  
  977. TextEditor.mcc/MUIM_TextEditor_MacroBegin
  978.  
  979.     NAME
  980.         MUIM_TextEditor_MacroBegin
  981.  
  982.     SYNOPSIS
  983.         DoMethod(obj, MUIM_TextEditor_MacroBegin);
  984.  
  985.     FUNCTION
  986.         Not yet implemented...
  987.  
  988.     RESULT
  989.  
  990.  
  991.     SEE ALSO
  992.         MUIM_TextEditor_MacroEnd, MUIM_TextEditor_MacroExecute
  993.  
  994. TextEditor.mcc/MUIM_TextEditor_MacroEnd
  995.  
  996.     NAME
  997.         MUIM_TextEditor_MacroEnd
  998.  
  999.     SYNOPSIS
  1000.         DoMethod(obj, MUIM_TextEditor_MacroEnd);
  1001.  
  1002.     FUNCTION
  1003.         Not yet implemented...
  1004.  
  1005.     RESULT
  1006.  
  1007.  
  1008.     SEE ALSO
  1009.         MUIM_TextEditor_MacroBegin, MUIM_TextEditor_MacroExecute
  1010.  
  1011. TextEditor.mcc/MUIM_TextEditor_MacroExecute
  1012.  
  1013.     NAME
  1014.         MUIM_TextEditor_MacroExecute
  1015.  
  1016.     SYNOPSIS
  1017.         DoMethod(obj, MUIM_TextEditor_MacroExecute);
  1018.  
  1019.     FUNCTION
  1020.         Not yet implemented...
  1021.  
  1022.     RESULT
  1023.  
  1024.  
  1025.     SEE ALSO
  1026.         MUIM_TextEditor_MacroBegin, MUIM_TextEditor_MacroEnd
  1027.  
  1028. TextEditor.mcc/MUIM_TextEditor_MarkText
  1029.  
  1030.     NAME
  1031.         MUIM_TextEditor_MarkText
  1032.  
  1033.     SYNOPSIS
  1034.         DoMethod(obj, MUIM_TextEditor_MarkText, ULONG start_x, ULONG start_y, ULONG stop_x, ULONG stop_y);
  1035.  
  1036.     FUNCTION
  1037.         This method will mark the given area.
  1038.  
  1039.     RESULT
  1040.         Not defined.
  1041.  
  1042. TextEditor.mcc/MUIM_TextEditor_Replace
  1043.  
  1044.     NAME
  1045.         MUIM_TextEditor_Replace
  1046.  
  1047.     SYNOPSIS
  1048.         DoMethod(obj, MUIM_TextEditor_Replace);
  1049.  
  1050.     FUNCTION
  1051.         Not yet implemented...
  1052.  
  1053.     RESULT
  1054.  
  1055.  
  1056.     SEE ALSO
  1057.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchFlags,
  1058.         MUIA_TextEditor_SearchWord, MUIM_TextEditor_ReplaceQuery
  1059.  
  1060. TextEditor.mcc/MUIM_TextEditor_ReplaceGUI
  1061.  
  1062.     NAME
  1063.         MUIM_TextEditor_ReplaceGUI
  1064.  
  1065.     SYNOPSIS
  1066.         DoMethod(obj, MUIM_TextEditor_ReplaceGUI);
  1067.  
  1068.     FUNCTION
  1069.         Not yet implemented...
  1070.  
  1071.     RESULT
  1072.  
  1073.  
  1074.     SEE ALSO
  1075.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchFlags,
  1076.         MUIA_TextEditor_SearchWord, MUIM_TextEditor_Replace,
  1077.         MUIM_TextEditor_ReplaceQuery
  1078.  
  1079. TextEditor.mcc/MUIM_TextEditor_ReplaceQuery
  1080.  
  1081.     NAME
  1082.         MUIM_TextEditor_ReplaceQuery
  1083.  
  1084.     SYNOPSIS
  1085.         DoMethod(obj, MUIM_TextEditor_ReplaceQuery);
  1086.  
  1087.     FUNCTION
  1088.         Not yet implemented...
  1089.  
  1090.     RESULT
  1091.  
  1092.  
  1093.     SEE ALSO
  1094.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchFlags,
  1095.         MUIA_TextEditor_SearchWord, MUIM_TextEditor_Replace,
  1096.         MUIM_TextEditor_ReplaceGUI
  1097.  
  1098. TextEditor.mcc/MUIM_TextEditor_Search
  1099.  
  1100.     NAME
  1101.         MUIM_TextEditor_Search
  1102.  
  1103.     SYNOPSIS
  1104.         DoMethod(obj, MUIM_TextEditor_Search);
  1105.  
  1106.     FUNCTION
  1107.         Not yet implemented...
  1108.  
  1109.     RESULT
  1110.  
  1111.  
  1112.     SEE ALSO
  1113.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchFlags,
  1114.         MUIA_TextEditor_SearchWord, MUIM_TextEditor_SearchGUI
  1115.  
  1116. TextEditor.mcc/MUIM_TextEditor_SearchGUI
  1117.  
  1118.     NAME
  1119.         MUIM_TextEditor_SearchGUI
  1120.  
  1121.     SYNOPSIS
  1122.         DoMethod(obj, MUIM_TextEditor_SearchGUI);
  1123.  
  1124.     FUNCTION
  1125.         Not yet implemented...
  1126.  
  1127.     RESULT
  1128.  
  1129.  
  1130.     SEE ALSO
  1131.         MUIA_TextEditor_ReplaceWord, MUIA_TextEditor_SearchFlags,
  1132.         MUIA_TextEditor_SearchWord, MUIM_TextEditor_Search
  1133.  
  1134.